<template>
	<view>
		<view class="add">
			<view class="ress" v-for="item in userList" :key="item.id" >
				
				<view class="da" @tap="look(item)">
					<text class="name">{{item.name}}----------></text>
					<text class="tel">电话:{{item.tel}}</text><br>
					<text class="city">{{item.cityStr}}</text>
				</view>
				
				<image src="../../../static/icons/edit.png" mode=" "  @tap="detail(item)" ></image>
				
			</view>    
				
				
				
		</view>
	</view>
</template>

<script>
	import {list } from "../../../util/goods/index.js"
	export default {
		data() {
			return {
				userList:[]
			};
		},
		
		onLoad(option) {
			list({
				userId:'52aeb3ea2a1f437399fac5e5391a4b2e'
			}).then(res=>{
				console.log(res)
				this.userList=res.data.data
			})
		},
		methods:{
			detail(val){
				
				uni.navigateTo({
					// url:'../detail/detail'
					 url:'../detail/detail?id='+ encodeURIComponent(JSON.stringify(val))
				})
			},
			
			look(item){
				uni.navigateTo({
					
					 url:'../pay/pay?id='+ encodeURIComponent(JSON.stringify(item))
				})
			}
		}
	}
</script>

<style lang="scss">
.add{
	width: 100%;
	height: 800px;
	background-color: #f5f5f5;
	
}
.ress{
	width: 100%;
	height: 100px;
	background-color: #f1ece7;
	image{
		width: 20px;
		height: 20px;
		position: absolute;
		left: 320px;
	}
}
.name{
	font-size: 18px;
}
.tel{
	font-size: 14px;
	color: #8c8c8c;
}
.city{
	font-size: 14px;
	color: #8c8c8c;
	margin-top: 20px;
}
</style>
